package com.dkm.ec.activity.repository;

import com.dkm.biz.repository.IRepository;
import com.dkm.ec.activity.domain.CommonActivityPartin;
import com.dkm.ec.activity.persistence.entity.CommonActivityPartinPo;

import java.util.List;

/**
 * Created by fanjinyuan on 2017/8/11.
 */
public interface CommonActivityPartinRepository extends IRepository<String, CommonActivityPartinPo, CommonActivityPartin> {


    /**
     * 查询活动下面的商品
     * @param activityId
     * @return
     */
    List<CommonActivityPartinPo> findActivityGoods(String activityId, int pageIndex, int pageSize);

    /**
     * 用于判断商家是否已参与指定活动
     * @param activityId
     * @param shopId
     * @return
     */
    Integer countForShopId(String activityId, String shopId);

    /**
     * 查询总的页数
     * @param activityId
     * @return
     */
    public Integer queryPages(String activityId, int pageSize);


}
